<html>
<head><title>BOXER and BORJ installation notes</title></head>
<body>
<h1>BOXER and BORJ installation notes - binary distribution</h1>

<em>Updated 2011-08-04</em>


<p>This document is intended for those users who have downloaded the
BOXER-and-BORJ binary distribution (the file
use-boxer-and-borj-*.*.*.zip). 
</p>

<p>If you have downloaded the source distribution (file
boxer-and-borj-source-*.*.*.zip, or source code from the Google Code
repository), and want to compile it yourself, please read the 
<a href="install-from-source.html">Installation from source code</a>
instructions instead.</p>

<h2>What's included</h2>

<p>The BOXER+BORJ binary distribution
includes the file boxer.jar (containing the pre-compilied code for
BOXER, BORJ, and a few other applications), as well as some thrid-party
jar files, documentation, and a sample scripts for running BORJ under
Unix (tiny-sample/test.sh) and Windows (tiny-sample/test.bat). </p>

<h2>Prerequisites</h2>

<h3>Java (JRE)</h3>

<p> BOXER has been compiled with Java 1.5, which means that you need
this version (or any later version) of Java to use the precompiled
BOXER binaries.  To run BORJ (or any other precompiled application
that uses BOXER) you just need the JRE (Java Runtime Environment) from
Java. If you wish to write and run your own Java application that uses
the BOXER library, you need the full JDK (Java Development Kit) to
compile your program, and then the JRE (which is a subset of JDK) to
run your compiled program, as is true of any Java program.</p>

<p>If you don't know whether the JRE and/or JDR are already installed on
your computer, or what version you have if so, you can type on the
Linux/UNIX command line
<pre>
  java -version
</pre>
If the Java interpreter (the program called "java") is already
installed and is in your path, you'll get a message from it, including
its version number.
</p>

<p>A suitable version of JDK would be e.g. the one
called <a href="http://java.sun.com/javase/">Java SE 6</a> by
Sun.com. It as available for download, for several platforms, 
from <a href="http://java.sun.com/javase/downloads/index.jsp">Java SE
download site</a>, where it's called "java Platform (JDK)".
</p>

<p>As an alternative to downloading JRE/JDK from Sun.com, users of
some some operating systems may obtain an implementation of JRE or JDK
from the provider of their OS. For example, Ubuntu users can install
JDK with
<pre>
  sudo apt-get install  openjdk-6-jdk
</pre>
</p>

<p>As another example, the Apple Mac OS X versions up to 10.6 ("Snow
Leopard") shipped with the Java Platform, Standard Edition for Mac OS X.
As 
<a
href="http://developer.apple.com/library/mac/#documentation/Java/Conceptual/Java14Development/01-JavaOverview/JavaOverview.html#//apple_ref/doc/uid/TP40001883-SW1"> 
described by Apple
</a>, this software
"includes all the components  you would normally associate with the Java
SE Runtime Environment (JRE) as well as the Java SE Development Kit
(JDK)."  Typing
<pre>
  java -version
</pre>
on the command line under version 10.6.7 of OS X produces a message such as
<pre>
<p>java version "1.6.0_20"</p>
<p>Java(TM) SE Runtime Environment (build 1.6.0_20-b02-279-10M3065)</p>
<p>Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01-279, mixed mode)</p>
</pre> 


<p>Naturally, if you already have full Java EE (which is JDK + some additional
libraries and tools) it would do as well.</p>


<p>If you want to use BOXER with an earlier version of Java than 1.5, you can
also download the BOXER source code and try to re-compile it with your
version; see the <a href="install-from-source.html">instructions</a>.</p>

<h3>Third-party libraries</h3>
<p>
To use BOXER and BORJ, you need external JAR files from the
Apache Xerces project: <tt>xercesImpl.jar</tt>
and <tt>xml-apis.jar</tt>. For the user convenience, we now (from
version 0.9 on) include these files into the BOXER+BORJ binary
distribution; they are in the same <tt>lib</tt> directory
as <tt>borj.jar</tt>, and should stay there. 
</p>

<p>For more details about the provenance of these files, see <a href="xerces.html">xerces.html</a>


<h3>C Shell and Perl</h3>

<p>The BOXER and BORJ binary distribution comes with a sample C Shell
script illustrating the command line for running BOXER. Practically
all UNIX/Linux machines have C Shell already installed.
</P>

<p>The BOXER sample data distribution includes a number of C Shell and
Perl scripts for running BORJ and other BOXER applications in a
variety of ways. 
</p>

<h2>Downloading and using BOXER binaries</h2>

<p>If you plan to use BOXER, but not to modify it, you only need to
download the "BOXER binaries", i.e. a a Jar file containing compiled
BOXER and BORJ code.

<p>This jar file can be downloaded from the
<a href="http://code.google.com/p/boxer-bayesian-regression/downloads/list">download
section</a> on our Google Code project. Look fot the most recent file 
with the name patterned on use-boxer-and-borj-*.*.*.zip, e.g. 
use-boxer-and-borj-0.9.001.zip
</p>

<p>Extract all files from the archive (using, e.g. the "unzip" command on Linux). This will  create a directory named
use-boxer-and-borj-*.*.* (with the appropriate version number instead
of stars). The compiled BOXER
and BORJ code is located in the file lib/boxer.jar; certain
third-party JAR files are also in the same subdirectory. The file
boxer.jar contains a manifest file that instructs the Java Virtual
Machine to add these thrid-party JAR files into the class path;
therefore, for the JVM to find them, all these JAR files must stay in
this directory.
</P>

<p>
To try using a BOXER application named BORJ, please go to the
directory tiny-sample and run the script named test.sh (on UNIX/Linux)
or test.bat on MS Windows. If it works, you know that all components
are in place.
</p>

<p>To run BORJ and other BOXER applications You can just add
boxer.jar, to your classpath (either by modifying the CLASSPATH
environment variable, or by using the "-cp" option to "java"). For
example, if you run BORJ (a BOXER application included into the BOXER
distribution), the Linux/UNIX command line may look like this:
<pre>
 java -cp /home/myusername/use-boxer-and-borj-0.8.001/lib/boxer.jar edu.dimacs.mms.borj.Driver ...
</pre>
If you have written your own application that uses the BOXER API, and
your application's main class is called MyMainClass, living in
myjar.jar, then your command line may look like this:
<pre>
 java -cp  /home/myusername/use-boxer-and-borj-0.8.001/lib/boxer.jar:myjar.jar MyMainClass
</pre>
</p>

<p><strong>Note</strong>: If you're using MS Windows rather than Linux/UNIX, you should use semicolon (;) rather than colon (:) between the components of the classpath in the examples above.
</P>


<hr>
<div align=center>
Back to the <a href="index.html">main page</a>
</div>

</body>
</html>
